﻿// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// TRANSFORM_TEX(v.uv, _MainTex): v.uv * _MainTex_ST.xy + _MainTex_ST.zw
// multi_compile_fwdadd: multi_compile DIRECTIONAL DIRECTIONAL_COOKIE POINT POINT_COOKIE SPOT

Shader "Custom/Project4/NormalShader1"
{
	Properties {
		_Tint ("Tint", Color) = (1, 1, 1, 1)
		_MainTex ("Albedo", 2D) = "white" {}
		[NoScaleOffset] _HeightMap ("HeightMap", 2D) = "gray" {}
		[Gamma] _Metallic ("Metallic", Range(0, 1)) = 0
		_Smoothness ("Smoothness", Range(0, 1)) = 0.5
	}
	
	SubShader 
	{
		Pass
		{
			Tags
			{
				"LightMode" = "ForwardBase"
			}
			CGPROGRAM
			
				#pragma target 3.0
				
				#pragma multi_compile _ VERTEXLIGHT_ON
								
				#pragma vertex MyVertexProgram
				#pragma fragment MyFragmentProgram
				
				#define FORWARD_BASE_PASS
				
				#include "LightingLib1.cginc"
				
			ENDCG
		}
		Pass
		{
			Tags
			{
				"LightMode" = "ForwardAdd"
			}
			
			Blend One One
			ZWrite Off
			
			CGPROGRAM
			
				#pragma target 3.0
				
				#pragma multi_compile_fwdadd
								
				#pragma vertex MyVertexProgram
				#pragma fragment MyFragmentProgram
				
				#include "LightingLib1.cginc"
				
			ENDCG
		}
	}
}















